// src/api/hero.api.js
import request from '@/utils/request'

const HeroAPI = {
    //查询英雄列表
    getHeroList(){
        return request({
            url:`/heros`,
            method:'get',
        })
    },
    searchHero(keyword) {
    return request({
        url: `/heros/search`,
        method: 'get',
        params: { keyword } // 将参数正确传递
    })
    },
    // 获取英雄羁绊信息
    getHeroBonds(heroId) {
        return request({
            url: `/heros/${heroId}/bonds`,
            method: 'get',
        })
    },

    //查询英雄详情
    getHero(id){
        return request({
            url:`/heros/${id}`,
            method:'get'
        })
    }
}

export default HeroAPI
